/*
 * UartContext.h
 *
 *  Created on: Sep 5, 2017
 *      Author: guoxs
 */
#include <string>
#include "../activity/mainActivity.h"
using std::string;
#ifndef _MYHCPP_MYCPP_H_
#define u8 uint8_t

void Write_txt(const char* str_flie,char* str);
string Rrad_txt(const char* str_flie);

void Write_txt_float(const char* str_flie,double myfloat);
double Read_txt_float(const char* str_flie);

void Write_txt_int(const char* str_flie,int16_t myfloat);
int16_t  Read_txt_int(const char* str_flie);

void myprintf(ZKTextView* x,const char* y,double z);
void myprintf(ZKEditText* x,const char* y,double z);
void myprintf(ZKTextView* x,double z,int y);
void myprintf(ZKTextView* x,int z);
void myprintf(ZKTextView* x,const char* y);

void myprintf(ZKListView::ZKListSubItem* x,const char* y,double z);
void myprintf(ZKListView::ZKListSubItem* x,double z,int y);
void myprintf(ZKListView::ZKListSubItem* x,int z);
void myprintf(ZKListView::ZKListSubItem* x,string z);
float get_float(ZKTextView* x);
uint16_t get_int(ZKTextView* x);
string get_txt(ZKTextView* x);

double myround(double x,int y);

//延时函数
void delay(uint16_t x);

//打开wifi设置
void wifiset();

//切字符串代码 string_cutting(string 源数据的字符串, string 开头字符串, string 开头字符串);
string string_cutting(string meat, string str0, string str1);

#endif /* _UART_UARTCONTEXT_H_ */
